<?php
/**
 * Created by PhpStorm.
 * User: chenx
 * Date: 18-2-25
 * Time: 下午2:42
 */
namespace backend\controllers;
use backend\models\JurisdGroup;

class PermissionController extends BaseController {

    //权限组列表
    public function actionGetgurstgroup(){
        $arr = ["admin"=>array(
            "01"=>array(
                "parent_code"=>"0",
                "name_code"=>"01",
                "name_name"=>"权限01",
                "checked"=>false,
                "controller"=>"test",
                "action"=>'index',
                ),
            "0101"=>array(
                "parent"=>"01",
                "code"=>"0101",
                "display"=>"权限0101",
                "checked"=>false,
                "controller"=>"index",
                "action"=>'index',
                ),
            ),
        ];

    }

    //添加权限
    public function actionAddGroup(){
//        'add-group'
        $perms = ['01','0101'];
        $group_name = '权限组1';
        $group_jurisd_id = implode(',',$perms);
        $gurop_model = new JurisdGroup();

        $data = $this->post();

        $gurop_model->setAttributes($data);

        $gurop_model->save();


    }



}